<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../script/bootstrap-3.3.7.min.css">
    <script src="../script/jquery-1.10.min.js"></script>
    <script>

        function display() {
                aaa =1
                var bbb
                bbb =2
        }
        function display1() {
            if (typeof(bbb) == undefined ) {
                alert('aaa:' + aaa + " " + "bbb: " + bbb)
            }
            else{
                alert('aaa:' + aaa )
            }

            }

    </script>
</head>
<body>
<div class="container">
    <div class="row">
    <div class="col-md-12">
        <p style="color: red;font-size: 1.5em;"></p>
    </div>
</div>
    <div class="row">
        <!--<div>-->
            <!--<textarea id = "text1" rows="15" cols="50"></textarea>-->
            <!--<script>-->
                <!--str='function display() {\n' +-->
                    <!--'     aaa =1 没有写var 默认window.aaa  全局变量\n' +-->
                    <!--'      var bbb 此函数以外不能使用bbb \n'+-->
                    <!--'      bbb =2\n' +-->
                    <!--'   }\n' +-->
                    <!--'  function display1() {\n' +-->
                    <!--'      if (typeof(bbb) == undefined ) {\n' +-->
                    <!--'         alert(\'aaa:\' + aaa + " " + "bbb: " + bbb)\n' +-->
                    <!--'      }\n' +-->
                    <!--'       else{\n' +-->
                    <!--'          alert(\'aaa:\' + aaa )\n' +-->
                    <!--'        }\n' +-->
                    <!--'\n' +-->
                    <!--'  }'-->
                <!--document.getElementById("text1").value=str-->
            <!--</script>-->
        <!--</div>-->
    </div>
    <div class="row">
    <!--<div class="col-md-6 col-md-offset-2">-->
        <!--<div><button onclick="display()" class="btn btn-danger">先执行dispaly 生成变量</button></div>-->
        <!--<div><button onclick="display1()" class="btn btn-danger">在执行display1</button></div>-->
    <!--</div>-->
        <div class="col-md-4 ">
            <div>
                <img src="img/str_attr.JPG">
            </div>
        </div>
        <div class="col-md-4">
                    <div style="width: 361px;height: 360px;background: url('img/str1.JPG') no-repeat">
                    <p style="font-weight: bold;font-size: 1.5em;color:red;opacity: 0.8;margin: 30px 40px">特殊字符</p>
                    </div>
        </div>
            <div class="col-md-4">
                    <div style="width: 361px;height: 360px;background: url('img/str_func.JPG') no-repeat">
                    <p style="font-weight: bold;font-size: 1.5em;color:red;opacity: 0.8;margin: 30px 40px">字符串方法</p>
                    </div>
        </div>
        </div>
    <div class="row">
        <div class="col-md-4">
                    <div style="width: 361px;height: 360px;background: url('img/str_html.JPG') no-repeat">
                    <p style="font-weight: bold;font-size: 1.5em;color:red;opacity: 0.8;margin: 30px 40px">字符串HTML包装方法</p>
                    </div>
        </div>
</div>
    </div>

    <p class="page-header"></p>

<script>


</script>
</body>
</html>